<?php

namespace App\Http\Requests\Api;

use Illuminate\Foundation\Http\FormRequest;

class InfoContent extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'type_name' => ['required'],
            'article_name' => ['required'],
        ];
    }

    /**
     * 错误消息提醒
     *
     * @return array|string[]
     */
    public function messages()
    {
        return [
            'type_name.required' => '分类名是必须的',
            'article_name.required' => '接口名称是必须的',
        ];
    }
}
